<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>4-同时绑定2个事件进行切换</title>
		<script type="text/javascript" src="js/jquery2.1.4.min.js"></script>
		<style type="text/css">
			div{
				width:100px;
				height:100px;
				line-height:100px;
				text-align: center;
				color:#fff;
				font-size:20px;
				background:#000;
			}
			.cur{
				background:red;
			}
		</style>
	</head>
	<body>
		<div>百度</div>
		<script type="text/javascript">
			$(function(){
				$('div').on("mouseover mouseout",function(){
					console.log("abc");
					$(this).toggleClass('cur');
				});
			});
		</script>
	</body>
</html>
